package com.xinnet.core.validate.attribute;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import com.xinnet.core.validate.AlphaNum2Validator;

/**
 * 将数据定义为RFC1630的"alphanum2"的范围中包含的事物的标注。
 * alphanum2中包含半角英文字母和数字、(-)、(_)、(.)和(+)。
 * <ul>
 * <li>alphanum2 := alpha | digit | - | _ | . | +
 * </ul>
 * RFC 1630: <a
 * href="http://www.w3.org/Addressing/rfc1630.txt">http://www.w3.org/Addressing/rfc1630.txt</a>
 * 
 * @author wenjianye
 */
@Target( { METHOD, FIELD, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Constraint(validatedBy = AlphaNum2Validator.class)
@Documented
public @interface AlphaNum2 {
	


    String message() default "";


    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
